package com.hejia.alauda.persistence.mybatis;

import java.util.List;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import com.hejia.alauda.entity.BankMaintain;
import com.hejia.alauda.persistence.BaseMapper;

public interface BankMaintainMapper extends BaseMapper<BankMaintain> {

	/**
	 * 改变过期的维护状态为"done"
	 * 
	 * @param
	 * @return
	 */
	@Select("select * from `bankmaintain` where `repeattimes`='one' and `status`!='done' and (`startDate`<#{0} or (`startDate`=#{0} and `endTime`<#{1}))")
	@ResultMap("ListMap")
	public List<BankMaintain> findOverdueBankMaintain(String nowDate, String now);

}
